
# Update GTK+-3.0 modules cache
gtk-query-immodules-3.0 --update-cache

# Update GLIB schemas
for schema_directory in /usr/local/share/glib* /usr/share/glib*
do
    test -d "$schema_directory" || continue;
    glib-compile-schemas "${schema_directory}"/schemas
done
unset schema_directory

# Update GDK pixbuf loaders cache, just in case
chroot . /usr/bin/gdk-pixbuf-query-loaders --update-cache > /dev/null 2>&1

echo "Updating desktop database: update-desktop-database -q usr/share/applications"
chroot "$rootdir" /usr/bin/update-desktop-database -q usr/share/applications 2> /dev/null

echo "Updating ICON cache: gtk-update-icon-cache -q -f -i usr/share/icons/hicolor"
chroot "$rootdir" /usr/bin/gtk-update-icon-cache -q -f -i usr/share/icons/hicolor 2> /dev/null

